<script setup lang="ts">
import { onMounted, ref } from "vue";
import { useUserStore } from "@/store/modules/user";

const loading = ref(true);
const userStore = useUserStore();

onMounted(() => {
  // 选择租户
  userStore.getUserInfo(() => {
    loading.value = false;
  });
});
</script>

<template>
  <div class="baseLayout-box" v-if="loading">
    <van-loading />
  </div>
  <RouterView v-else />
</template>

<style scoped lang="scss">
.baseLayout-box {
  text-align: center;
  padding-top: 40%;
}
.content {
  width: 100%;
  min-height: 100vh;
}
</style>
